package cn.hqm.hqmtechnology.controller;

import cn.hqm.hqmtechnology.common.R;
import cn.hqm.hqmtechnology.dao.dto.VersionDTO;
import cn.hqm.hqmtechnology.dao.po.Version;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import cn.hqm.hqmtechnology.service.VersionService;

import javax.annotation.Resource;

@RestController
public class VersionController {

    @Resource
    private VersionService versionService;

    @PostMapping("/version/versionAdd")
    public R versionAdd(@RequestBody VersionDTO versionDTO) {
        return R.ok( versionService.versionAdd(versionDTO));
    }
    @PostMapping("/version/versionPage")
    public R versionPage(@RequestBody VersionDTO versionDTO) {
        return R.ok( versionService.versionPage(versionDTO));
    }
    @PostMapping("/version/versionList")
    public R versionList(@RequestBody VersionDTO versionDTO) {
        return R.ok( versionService.versionList(versionDTO));
    }
    @PostMapping("/version/versionOver")
    public R versionOver(@RequestBody VersionDTO versionDTO) {
        return R.ok( versionService.versionOver(versionDTO));
    }

}